using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class BlackHole_Hotkey_Controler : MonoBehaviour
{
    private SpriteRenderer sr;
    private KeyCode myHotKey;
    private TextMeshProUGUI myTextMeshPro;
    private Transform myEnemy;
    private BlackHoleSkillControler blackHole;
    public void SetUpHotKey(KeyCode _myHotKey,Transform _myEnemy,BlackHoleSkillControler _myBlackHole)
    {
        sr=GetComponent<SpriteRenderer>();
        myTextMeshPro=GetComponentInChildren<TextMeshProUGUI>();
        myHotKey = _myHotKey;
        myEnemy= _myEnemy;
        blackHole = _myBlackHole;
        myTextMeshPro.text=_myHotKey.ToString();
    }
    private void Update()
    {
        if(Input.GetKeyDown(myHotKey))
        {
            blackHole.AddEnemyToList(myEnemy);
            myTextMeshPro.color = Color.clear;
        }
    }
}
